﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Report_PayDetailStatistics" Codebehind="PayDetailStatistics.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript" src="../Include/Js/SocanCode.js"></script>
    <script type="text/javascript" src="../Include/Js/PopupCalendar.js"></script>
    <script type="text/javascript" src="../Include/Js/OpenWindow.js"></script>
    <script language="javascript" type="text/javascript">
    function GetPayType(path,type)
    {
        var payType=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectPayType.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(payType==undefined)
        {
                document.all("dropOrderPayType").value="";//没有选择支付方式时，默认是现金支付

                document.all("dropReturnPayType").value="";
                document.all("dropCZDPayType").value="";
        }
        else
        {
            if(type==0)
            {
                document.all("dropOrderPayType").value=payType;
            }
            else if(type==1)
            {
                document.all("dropReturnPayType").value=payType;
            }
            else
            {
                document.all("dropCZDPayType").value=payType;
            }
        }
    }
    function GetDealType(path,type)
    {
        var dealType=window.showModalDialog(path+"DialogBoxHostFrame.aspx?url=Report/SelectDealType.aspx",window,"status:off;center=yes;edge:raised;dialogHeight:525px;dialogWidth:530px;help:0;resizable:0;scrollbar=0");
        if(dealType==undefined)
        {
            document.all("dropOrderDealType").value="";//没有选择支付方式时，默认是现金支付

            document.all("dropReturnDealType").value="";
        }
        else
        {
            if(type==0)
            {
                document.all("dropOrderDealType").value=dealType;
            }
            else
            {
                document.all("dropReturnDealType").value=payType;
            }
        }
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div align="Justify">
    <h2>支付明细统计</h2>
        <div class="menu_bg">统计单据：<asp:DropDownList ID="dropBillType" runat="server">
                <asp:ListItem Text="全部" Value="all"></asp:ListItem>
                <asp:ListItem Text="订单" Value="order"></asp:ListItem>
                <asp:ListItem Text="退货单 " Value="return"></asp:ListItem>
                <asp:ListItem Text="充值单 " Value="remittance"></asp:ListItem>
            </asp:DropDownList></div>
            <div class="menu_bg3">
            订单查询条件：<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            发货：<asp:DropDownList ID="dropDelivery" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList>
            财审：<asp:DropDownList ID="dropOrderAcheck" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList>
            结算：<asp:DropDownList ID="dropOrderClear" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList>
            制单日期：<asp:TextBox ID="txtOrderStartDate" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtOrderEndDate" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
        交易类型：<input type="text" id="dropOrderDealType" runat="server" readonly="readonly" style="width:100px;" onclick="GetDealType('../',0)"/>
        到帐：<asp:DropDownList ID="dropGet" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList><br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            支付方式：<input type="text" id="dropOrderPayType" runat="server" readonly="readonly"  style="width:100px;" onclick="GetPayType('../',0)"/>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        支付日期：<asp:TextBox ID="txtOrderPayDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtOrderPayDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
             <div style="display:none">交易日期：<asp:TextBox ID="txtOrderDealDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtOrderDealDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            <br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
        到帐日期：<asp:TextBox ID="txtOrderGetDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtOrderGetDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
        <br /><br />
            退货单查询条件：<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            入库：<asp:DropDownList ID="dropIntoStock" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList>
            财审：<asp:DropDownList ID="dropReturnAcheck" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList>
            结算：<asp:DropDownList ID="dropReturnClear" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="True"></asp:ListItem>
            </asp:DropDownList>
            制单日期：<asp:TextBox ID="txtReturnStartDate" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtReturnEndDate" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
        
        交易类型：<input type="text" id="dropReturnDealType" runat="server" readonly="readonly" style="width:100px;" onclick="GetDealType('../',1)"/>
        支付方式：<input type="text" id="dropReturnPayType" runat="server" readonly="readonly" style="width:100px;" onclick="GetPayType('../',1)"/>&nbsp;<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        支付日期：<asp:TextBox ID="txtReturnPayDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtReturnPayDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
        <div style="display:none">
        交易日期：<asp:TextBox ID="txtReturnDealDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtReturnDealDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            </div>
            <br /><br />
        充值单查询条件：<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            支付方式：<input type="text" id="dropCZDPayType" runat="server" readonly="readonly"  style="width:100px;" onclick="GetPayType('../',2)"/>
            审核：<asp:DropDownList ID="dropCZDCheck" runat="server">
                <asp:ListItem Text="" Value="-1">全部</asp:ListItem>
                <asp:ListItem Text="否 " Value="0"></asp:ListItem>
                <asp:ListItem Text="是 " Value="1" Selected="true"></asp:ListItem>
            </asp:DropDownList>            
            充值日期：<asp:TextBox ID="txtCZDCreateDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtCZDCreateDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            制单日期：<asp:TextBox ID="txtCZDCZDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtCZDCZDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            <br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            审核日期：<asp:TextBox ID="txtCZDCheckDateStart" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>
            至<asp:TextBox ID="txtCZDCheckDateEnd" runat="server" Width="100px" OnClick="getDateString(this,oCalendarChs)"></asp:TextBox>

        
            </div>
            <div class="menu_bg"><asp:Button ID="btnSearch" runat="server" CssClass="input_button3" Text="开始统计" OnClick="btnSearch_Click" /> <asp:Button ID="Button1" runat="server" CssClass="input_button3" Text="导出" OnClick="Export_Click" /></div>
        <div class="juli"><asp:DataList ID="dlistPayDetail" runat="server" OnItemDataBound="dlistPayDetail_ItemDataBound">
            <HeaderTemplate>
                <table class="tb4" border="0" cellpadding="0" cellspacing="1">
                    <tr class="z1">
                        <td class="zt3">
                            单据编号
                        </td>
                        <td class="zt3">
                            发货/入库
                        </td>
                        <td class="zt3">
                            财务审核
                        </td>
                        <td class="zt3">
                            结算
                        </td>
                        <td class="zt3">
                            单据生成时间
                        </td>
                        <td class="zt3">
                            支付方式
                        </td>
                        <td class="zt3">
                            支付金额
                        </td>
                        <td class="zt3">
                            支付日期
                        </td>
                        <td class="zt3">
                            交易号

                        </td>
                        <td class="zt3" style="display:none">
                            交易日期
                        </td>
                        <td class="zt3">
                            帐户
                        </td>
                        <td class="zt3">
                            到帐
                        </td>
                        <td class="zt3">
                            到帐金额
                        </td>
                        <td class="zt3">
                            到帐日期
                        </td>
                        <td class="zt3">
                            交易类型
                        </td>
                        <td class="zt3">
                            已退货金额

                        </td>
                        <td class="zt3">
                            备注
                        </td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                    <tr class="z2">
                        <td class="zt4">
                            <%# Eval("ID")%>
                        </td>
                        <td class="zt4">
                            <asp:CheckBox ID="CheckBox2" runat="server" Checked=' <%# Convert.ToString(Eval("SendOrReceive"))=="1"?true:false %>' Enabled="false" />
                        </td>
                        <td class="zt4">
                            <asp:CheckBox ID="CheckBox1" runat="server" Checked=' <%# Convert.ToString(Eval("Clear"))=="1"?true:false %>' Enabled="false" />
                        </td>
                        <td class="zt4">
                            <asp:CheckBox ID="CheckBox3" runat="server" Checked=' <%# Convert.ToString(Eval("Acheck"))=="1"?true:false %>' Enabled="false" />
                        </td>
                        <td class="zt4">
                            <%# Eval("CreateDate")%>
                        </td>
                        <td class="zt4">
                            <%# Eval("PayTypeName")%>
                        </td>
                        <td class="zt4">
                            <asp:Label ID="lblPayAmt" runat="server" Text='<%# Eval("PayAmt")%>'></asp:Label>
                        </td>
                        <td class="zt4">
                            <%# Eval("PayDate")%>
                        </td>
                        <td class="zt4">
                            <%# Eval("DealId")%>
                        </td>
                        <td class="zt4" style="display:none">
                            <%# Eval("DealDate")%>
                        </td>
                        <td class="zt4">
                            <%# Eval("Account")%>
                        </td>
                        <td class="zt4">
                            <asp:CheckBox ID="CheckBox4" runat="server" Checked=' <%# Convert.ToString(Eval("Get"))=="1"?true:false %>' Enabled="false" />
                        </td>
                        <td class="zt4">
                            <asp:Label ID="lblGetAmt" runat="server" Text='<%# Eval("GetAmt")%>'></asp:Label>
                        </td>
                        <td class="zt4">
                            <%# Eval("GetDate")%>
                        </td>
                        <td class="zt4">
                            <%# Eval("DealTypeName")%>
                        </td>
                        <td class="zt4">
                            <asp:Label ID="lblHRAMT" runat="server" Text='<%# Eval("HRAMT")%>'></asp:Label>
                        </td>
                        <td class="zt4">
                            <%# Eval("Note")%>
                        </td>
                    </tr>
            </ItemTemplate>
            <FooterTemplate>
                    <tr class="z2">
                        <td class="zt4">
                            总计：

                        </td>
                        <td class="zt4">
                            
                        </td>
                        <td class="zt4">
                            
                        </td>
                        <td class="zt4">
                            
                        </td>
                        <td class="zt4">
                            
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4">
                            <asp:Label ID="lblPayAmt" runat="server"></asp:Label>
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4" style="display:none">
                        
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4">
                            <asp:Label ID="lblGetAmt" runat="server"></asp:Label>
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4">
                        
                        </td>
                        <td class="zt4">
                            <asp:Label ID="lblHRAMT" runat="server"></asp:Label>
                        </td>
                        <td class="zt4">
                        
                        </td>
                    </tr>
                 </table>   
            </FooterTemplate>
        </asp:DataList></div>
     </div>
    </form>
</body>
</html>
